{% set APP_NAME = pillar.get('app_name') %}
{% set COMMIT = pillar['commit'] %}
{% set BACKUP_DIR =  pillar['backup_dir'] %}

create_conf_dir:
  file.directory:
    - name: {{BACKUP_DIR}}/{{APP_NAME}}/{{COMMIT}}/conf
    - user: mingjue
    - group: mingjue
    - dir_mode: 755
    - makedirs: True
    - recurse:
      - user
      - group

create_dependency_dir:
  file.directory:
    - name: {{BACKUP_DIR}}/{{APP_NAME}}/{{COMMIT}}/dependency
    - user: mingjue
    - group: mingjue
    - dir_mode: 755
    - makedirs: True
    - recurse:
      - user
      - group

create_lib_dir:
  file.directory:
    - name: {{BACKUP_DIR}}/{{APP_NAME}}/{{COMMIT}}/lib
    - user: mingjue
    - group: mingjue
    - dir_mode: 755
    - makedirs: True
    - recurse:
      - user
      - group